using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.Hr.Bill;
using HengTong.Model.Db.Hr;
using TiaoTaoHelper.Wtm.Models;


namespace HengTong.ViewModel.Daily.SysDailyOvertimeRequestBillVms
{
    public partial class SysDailyOvertimeRequestBillTemplateVm : BaseTemplateVM
    {
        [Display(Name = "员工")]
        public ExcelPropety PersonExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.PersonId);
        [Display(Name = "员工工号")]
        public ExcelPropety StaffNoExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.StaffNo);
        [Display(Name = "员工姓名")]
        public ExcelPropety NameExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.Name);
        [Display(Name = "开始时间")]
        public ExcelPropety StartTimeExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.StartTime);
        [Display(Name = "结束时间")]
        public ExcelPropety EndTimeExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.EndTime);
        [Display(Name = "加班时长(小时)")]
        public ExcelPropety OvertimeHoursExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.OvertimeHours);
        [Display(Name = "加班补偿方式")]
        public ExcelPropety CompensationTypeExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.CompensationType);
        [Display(Name = "剩余可调休时长(小时)")]
        public ExcelPropety RemainingCompOffHoursExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.RemainingCompOffHours);
        [Display(Name = "加班事由")]
        public ExcelPropety ReasonExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.Reason);
        [Display(Name = "审批人")]
        public ExcelPropety ApproverExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.Approver);
        [Display(Name = "审批时间")]
        public ExcelPropety ApprovalTimeExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.ApprovalTime);
        [Display(Name = "所属部门")]
        public ExcelPropety GroupExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.GroupId);
        [Display(Name = "所属机构")]
        public ExcelPropety OrgExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.OrgId);
        [Display(Name = "单据编号")]
        public ExcelPropety BillCodeExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.BillCode);
        [Display(Name = "单据状态")]
        public ExcelPropety BillStatusExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.BillStatus);
        [Display(Name = "工作流状态")]
        public ExcelPropety WorkflowStatusExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.WorkflowStatus);
        [Display(Name = "备注")]
        public ExcelPropety RemarkExcel = ExcelPropety.CreateProperty<SysDailyOvertimeRequestBill>(x => x.Remark);

	    protected override void InitVM()
        {
            PersonExcel.DataType = ColumnDataType.ComboBox;
            PersonExcel.ListItems = DC.Set<SysPerson>().GetSelectListItems(Wtm, y => y.Name);
            GroupExcel.DataType = ColumnDataType.ComboBox;
            GroupExcel.ListItems = DC.Set<SysGroup>().GetSelectListItems(Wtm, y => y.GroupName);
            OrgExcel.DataType = ColumnDataType.ComboBox;
            OrgExcel.ListItems = DC.Set<SysOrg>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysDailyOvertimeRequestBillImportVm : BaseImportVM<SysDailyOvertimeRequestBillTemplateVm, SysDailyOvertimeRequestBill>
    {

    }

}
